<!doctype html>
<html lang="zh" >
<head>
    <meta charset="UTF-8" >
    <title>练习</title>
    <link rel="stylesheet" href="/node_modules/normalize-css/normalize.css">
    <link rel="stylesheet" href="/css/base.css">
    <script src="/node_modules/jquery/dist/jquery.js"></script>
    <script src="/node_modules/angular/angular.js"></script>
    <script src="/node_modules/angular-ui-router/release/angular-ui-router.js"></script>
    <script src="/js/base.js"></script>
    <script src="/js/user.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/question.js"></script>


</head>
<body ng-app="lianxi">

<div class="navbar clearfix">
    <div class="container">
        <div class="fl">
            <a ui-sref="home" class="navbar-item brand">动态</a>
            <form ng-submit="Question.go_add_title()" style="display: inline-block" ng-controller="QuestionController">
                <div class="navbar-item">
                    <input type="text" ng-model="Question.new_question.title" autocomplete="off">
                </div>
                <div class="navbar-item">
                    <button type="submit"  class="primary">添加</button>
                </div>
            </form>


        </div>
        <div class="fr">
            <a ui-sref="home" class="navbar-item">首页</a>
            @if(is_logged_in())
                <a ui-sref="login" class="navbar-item">{{session('username')}}</a>
                <div style="cursor:pointer" ng-controller="LogoutUserController" ng-click="LogoutUser.logout()" class="navbar-item">退出</div>
            @else
                <a ui-sref="login" class="navbar-item">登录</a>
                <a ui-sref="signup" class="navbar-item">注册</a>
            @endif
        </div>
    </div>
</div>
<div>
    <div ui-view></div>
</div>
</body>

</html>